package org.misty.seckill.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.apache.ibatis.type.Alias;

import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@ToString(exclude = {"password", "salt"})
@Alias("user")
public class User {
  @JsonSerialize(using = ToStringSerializer.class)
  private long id;
  private String nickname;
  //  @JSONField(serialize = false)
  private transient String password;
  //  @JSONField(serialize = false)
  private transient String salt;
  private String avatar;
  private Date registerDate;
  private Date lastLoginDate;
  private int loginCount;
}
